package rule15.db;

import rule15.Employee;

/**
 * @author ChangLiang
 * @date 2020/3/17
 */
class PayrollDatabaseImpl implements PayrollDatabase {
    @Override
    public Employee getEmployee(String empId) {
        return null;
    }

    @Override
    public void addEmployee(String empId, Employee e) {
        TransactionManager transactionManager = new TransactionManager();
        transactionManager.beginTransaction();
        transactionManager.commitTransaction();
    }

    private static class TransactionManager {

        public void beginTransaction() {
            System.out.println("begin transaction");
        }

        public void commitTransaction() {
            System.out.println("commit transaction");
        }
    }
}
